package com.aaa.controller.mht;

import com.aaa.entity.LayData;
import com.aaa.entity.MyPage;
import com.aaa.entity.TmhtRecord;
import com.aaa.entity.mht.TjMessage;
import com.aaa.service.mht.TmhtRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * (TmhtRecord)表控制层
 *
 * @author yuyongli
 * @since 2022-10-25 15:46:19
 */
@RestController
@RequestMapping("tFpaRecord")
public class TmhtRecordController {
    /**
     * 服务对象
     */
    @Autowired
    private TmhtRecordService tmhtRecordService;


    @GetMapping("checkrecord")
    public LayData checkUser(TmhtRecord record){
        return new LayData(tmhtRecordService.checkrecord(record));
    }

     @PostMapping("addrecord")
    public LayData addrecord(TmhtRecord record){

         return new LayData(tmhtRecordService.insertRecord(record));
    }

    @GetMapping("tj")
    public LayData getTongji(){

        return new LayData(tmhtRecordService.getTjData());
    }
    @GetMapping("tj2")
    public LayData getTongji2(MyPage myPage,TjMessage tjMessage){

        return new LayData(tmhtRecordService.getTjData2(myPage,tjMessage));
    }

}

